package com.mxpio.webapp.entity;

import com.mxpioframework.jpa.annotation.Generator;
import com.mxpioframework.security.entity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.ToString;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * 服务器网卡表
 *
 * @author: Cheng
 * @date: 2022/10/31
 */
@Entity
@Table(name = "MI_MONITOR_SERVER_NETCARD")
@Schema(description = "服务器网卡表")
@Data
@ToString
public class MonitorServerNetcard extends BaseEntity {

    @Id
    @Generator
    @Schema(description = "id")
    @Column(name = "id", length = 64)
    private String id;

    @Schema(description = "IP地址")
    @Column(name = "IP")
    private String ip;

    @Schema(description = "网卡序号")
    @Column(name = "NET_NO")
    private Integer netNo;

    @Schema(description = "网卡名字")
    @Column(name = "NAME")
    private String name;

    @Schema(description = "网卡类型")
    @Column(name = "TYPE")
    private String type;

    @Schema(description = "网卡地址")
    @Column(name = "ADDRESS")
    private String address;

    @Schema(description = "子网掩码")
    @Column(name = "MASK")
    private String mask;

    @Schema(description = "广播地址")
    @Column(name = "BROADCAST")
    private String broadcast;

    @Schema(description = "MAC地址")
    @Column(name = "HW_ADDR")
    private String hwAddr;

    @Schema(description = "网卡信息描述")
    @Column(name = "DESCRIPTION")
    private String description;

    @Schema(description = "接收到的总字节数")
    @Column(name = "RX_BYTES")
    private Long rxBytes;

    @Schema(description = "接收的总包数")
    @Column(name = "RX_PACKETS")
    private Long rxPackets;

    @Schema(description = "接收到的错误包数")
    @Column(name = "RX_ERRORS")
    private Long rxErrors;

    @Schema(description = "接收时丢弃的包数")
    @Column(name = "RX_DROPPED")
    private Long rxDropped;

    @Schema(description = "发送的总字节数")
    @Column(name = "TX_BYTES")
    private Long txBytes;

    @Schema(description = "发送的总包数")
    @Column(name = "TX_PACKETS")
    private Long txPackets;

    @Schema(description = "发送时的错误包数")
    @Column(name = "TX_ERRORS")
    private Long txErrors;

    @Schema(description = "发送时丢弃的包数")
    @Column(name = "TX_DROPPED")
    private Long txDropped;

    @Schema(description = "下载速度")
    @Column(name = "DOWNLOAD_BPS")
    private Double downloadBps;

    @Schema(description = "上传速度")
    @Column(name = "UPLOAD_BPS")
    private Double uploadBps;
}
